<template>
  <div class="trtain">
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="currentPage4"
      :page-sizes="pageSizes"
      :page-size="pageSize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total"
    ></el-pagination>
  </div>
</template>

<script>
export default {
  props: ["page", "pageSize", "pageSizes", "total"],
  methods: {
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
      this.$emit("setpageSize", val);
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
      this.$emit("setpage", val);
    }
  },
  data() {
    return {
      currentPage4: 1
    };
  }
};
</script>

<style lang="less" scoped>
.trtain {
  display: flex;
  justify-content: right;
  margin-top: 10px;
}
</style>